<!DOCTYPE html>
<html>
	<head>
    	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>新增模板</title>
	</head>
	<body>
		<div class="layui-fluid">
	        <div class="layui-card field-card">
	            <div class="layui-form layui-form-pane layui-card-body" style="padding: 15px;">
	                <div class="layui-form-item">
	                    <label class="layui-form-label">模板编号</label>
	                    <div class="layui-input-inline">
	                        <input type="text" id="code" name="code" lay-verify="required" autocomplete="off" class="layui-input" maxlength="50">
	                    </div>
	                    <div class="layui-form-mid layui-word-aux">模板编号由英文字母或数字组成，不可重复，最长50位</div>
	                </div>
	                <div class="layui-form-item">
	                    <label class="layui-form-label">模板名称</label>
	                    <div class="layui-input-inline">
	                        <input type="text" id="name" name="name" lay-verify="required" autocomplete="off" class="layui-input" maxlength="25">
	                    </div>
	                    <div class="layui-form-mid layui-word-aux">模板类型名称最多25个字符</div>
	                </div>
	                <div class="layui-form-item">
	                    <label class="layui-form-label">起始行</label>
	                    <div class="layui-input-inline">
	                        <input type="text" id="startRow" name="startRow" lay-verify="required" autocomplete="off" class="layui-input" maxlength="3" value="1">
	                    </div>
	                    <div class="layui-form-mid layui-word-aux">如果是excel，为遍历时从模板的第几行开始(0为第一行)</div>
	                </div>
	                <div class="layui-form-item">
	                    <label class="layui-form-label">允许导入</label>
	                    <div class="layui-input-block">
	                        <input type="radio" id="1_importType" name="importType" value="0" title="否" checked="checked" />
	                        <input type="radio" id="2_importType" name="importType" value="1" title="是" />
	                    </div>
	                </div>
	                <div class="layui-form-item">
	                    <label class="layui-form-label">允许导出</label>
	                    <div class="layui-input-block">
	                        <input type="radio" id="1_exportType" name="exportType" value="0" title="否" />
	                        <input type="radio" id="2_exportType" name="exportType" value="1" title="是" checked="checked" />
	                    </div>
	                </div>
	                <div class="layui-form-item">
	                    <label class="layui-form-label">取数据方式</label>
	                    <div class="layui-input-block">
	                        <input type="radio" id="1_getDataType" name="getDataType" value="1" title="数据库脚本" />
	                        <input type="radio" id="2_getDataType" name="getDataType" value="2" title="service层方法" checked="checked" />
	                    </div>
	                </div>
	                <div class="layui-form-item">
	                    <label class="layui-form-label">导出单元格</label>
	                    <div class="layui-input-block">
	                        <input type="text" id="singleText" name="singleText" lay-verify="required" autocomplete="off" class="layui-input" placeholder="根据获取方式填写sql或者填写service层方法。service层方法格式：serviceName.functionName" />
	                    </div>
	                </div>
	                <div class="layui-form-item">
	                    <label class="layui-form-label">导出列</label>
	                    <div class="layui-input-block">
	                        <input type="text" id="rowText" name="rowText" lay-verify="required" autocomplete="off" class="layui-input" placeholder="与单元格数据填写方式相同，如果service层方法和单元格相同，则填写相同方法，后端自动合并" />
	                    </div>
	                </div>
	                <div class="layui-form-item">
	                    <label class="layui-form-label">存数据方式</label>
	                    <div class="layui-input-block">
	                        <input type="radio" id="1_saveDataType" name="saveDataType" value="1" title="数据库脚本" />
	                        <input type="radio" id="2_saveDataType" name="saveDataType" value="2" title="service层方法" checked="checked" />
	                    </div>
	                </div>
	                <div class="layui-form-item">
	                    <label class="layui-form-label">导入单元格</label>
	                    <div class="layui-input-block">
	                        <input type="text" id="importSingleText" name="importSingleText" lay-verify="required" autocomplete="off" class="layui-input" placeholder="根据导入方式填写sql或者填写service层方法。service层方法格式：serviceName.functionName" />
	                    </div>
	                </div>
	                <div class="layui-form-item">
	                    <label class="layui-form-label">导入列</label>
	                    <div class="layui-input-block">
	                        <input type="text" id="importRowText" name="importRowText" lay-verify="required" autocomplete="off" class="layui-input" placeholder="与单元格数据填写方式相同，如果service层方法和单元格相同，则填写相同方法，后端自动合并" />
	                    </div>
	                </div>
	                <div class="layui-form-item">
	                    <input class="layui-btn" type="button" id="upload-btn" value="上传模板">
                        <input class="layui-btn" type="button" lay-submit lay-filter="form-submit" id="form-submit" value="提交">
	                </div>
	                <div class="layui-form-item">
	                    <div class="layui-form-item layui-hide">
	                    	<input type="hidden" id="tempKey" name="tempKey" />
	                    </div>
	                </div>
	            </div>
	        </div>
	    </div>
		<link rel="stylesheet" type="text/css" href="../layui/css/layui.css" />
		<script type="application/javascript" src="../js/jquery-2.1.0.js"></script>
		<script type="application/javascript" src="../layui/layui.js"></script>
		<script type="application/javascript" src="../js/tool.js"></script>
		<script type="application/javascript" src="../js/model-add.js"></script>
	</body>
</html>
